package com.libc.yygh.model.base;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * *
 * Created with Description: base实体
 *
 * @fileRelativePath: BaseEntity.java
 * @Date: Created on 2022/4/7  15:34  <br>
 * @author: LiBencheng <br>
 * @version: 1.0 <br>
 */
@Data
public class BaseEntity implements Serializable
{

    @ApiModelProperty (value = "id")
    @TableId (type = IdType.AUTO)
    private Long id;

    @ApiModelProperty (value = "创建时间")
    @JsonFormat (pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField ("create_time")
    private Date createTime;

    @ApiModelProperty (value = "更新时间")
    @TableField ("update_time")
    private Date updateTime;

    @ApiModelProperty (value = "逻辑删除(1:已删除，0:未删除)")
    @TableLogic
    @TableField ("is_deleted")
    private Integer isDeleted;

    @ApiModelProperty (value = "其他参数")
    @TableField (exist = false)
    private Map< String,Object > param = new HashMap<>();
}
